import axios from '@/api/fetch';
import SERVER from '@/api/server';

// 获取本地维修历史table
export const getfindAllRepairTypeList = params => axios.get(`${SERVER.DMS_WEB}/repair/rest/basedata/repairtypes/findAllRepairType`, { params });
export const getbrandsdictList = params => axios.get(`${SERVER.DMS_WEB}/customer/rest/basedata/brandsdict`, { params });
export const getlabourpriceList = params => axios.get(`${SERVER.DMS_WEB}/repair/rest/basedata/repairtypes/labourprice/item`, { params });
export const getfindInvoiceCodeList = params => axios.get(`${SERVER.DMS_WEB}/manage/rest/basedata/BasicParametersAfterSales/findInvoiceCode`, { params });
// 获取估价单表格数据
export const getrepairEstimateNOList = params => axios.get(`${SERVER.DMS_WEB}/repair/rest/basedata/repairEstimate/repairEstimateNO`, { params });
// 获取车主信息
export const getownerList = params => axios.get(`${SERVER.DMS_WEB}/repair/rest/basedata/queryByLinsence/owner`, { params });
// 添加车主
export const setowner = params => axios.post(`${SERVER.DMS_WEB}/repair/rest/basedata/queryByLinsence/addOwner`, params);
// 获取服务工程师
export const getqueryServiceAssList = params => axios.get(`${SERVER.DMS_WEB}/manage/rest/basedata/employees/queryServiceAss/dicts`, { params });
// 获取车系
export const getseriessdictList = params => axios.get(`${SERVER.DMS_WEB}/manage/rest/basedata/brandsdict/${params.brand}/seriessdict`, { params });
// 根据车系品牌获取车型
export const getmodelsdictList = params => axios.get(`${SERVER.DMS_WEB}/manage/rest/basedata/brandsdict/${params.brand}/seriessdict/${params.series}/modelsdict`, { params });
// 根据车型获取颜色
export const getcolorinfoList = params => axios.get(`${SERVER.DMS_WEB}/repair/rest/basedata/colors/colorinfo/${params.series}/dicts`, { params });
// 获取优惠模式
export const getqueryDiscountModeList = params => axios.get(`${SERVER.DMS_WEB}/repair/rest/basedata/discountmodes/queryDiscountMode`, { params });
// 获取维修项目
export const getroLabourByestimateNOList = params => axios.get(`${SERVER.DMS_WEB}/repair/rest/basedata/repairEstimate/roLabourByestimateNO/${params.code}`, { params });
// 获取维修材料
export const getpartByestimateNOList = params => axios.get(`${SERVER.DMS_WEB}/repair/rest/basedata/repairEstimate/partByestimateNO/${params.code}`, { params });
// 添加编辑修理估价
export const setrepairEstimate = params => axios.put(`${SERVER.DMS_WEB}/repair/rest/basedata/repairEstimate/save`, params);
